<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>三元运算符</title>
</head>
<body>
	<script type="text/javascript">
		// if...else
		// (条件) ?  run this code  : run this code;

		var isresult = 1 < 2 ?  '真的' : '假的';
		alert(isresult);
	</script>
	
</body>
</html>